<style media="screen" type="text/css">/*<![CDATA[*/@import 'stylesheet.css';/*]]>*/</style>
<style media="screen" type="text/css">/*<![CDATA[*/@import 'demo.css';/*]]>*/</style>
<style type="text/css">#title,#glyphs p{font-family:"LED"}</style>

<?php

require_once("inc.member.php");

if($get_s["select_lan"]) $_SESSION['lan'] = $get_s["select_lan"];

$this_title="$vars[title] &raquo; ".__("Member's Home");

$page_title=__("Member's Home");

$content_title=__("Member's Home");



$r_status_d=array("normal"=>__("Normal"),"unverified"=>__("Unverified"),"suspended"=>__("Suspended"),"terminated"=>__("Terminated"));

$r_yesno_d=array("y"=>__("Yes"), "n"=>__("No"));

$td_width=190;

$pop_msg = @mysql_result(mysql_query("select value from $db->settings where param='popup_msg'"), 0);

if($r_user['ref']>0){
	$sponsor_code = @mysql_result(mysql_query("select code from $db->users where id=".$r_user['ref']), 0);
}else{
	$sponsor_code = "-";
}

$acc=
"
		        <div class='widget'>
			        <div class='widget-header'>
			            <h3><span id='lblSalesInformation'>".__("Account Information")."</span></h3>
			        </div>
			        <div class='widget-content'>
			            <table class='table table-striped table-highlight'>
 <tr>

  <td>".__("Member ID").__(":")."</td>

  <td class='actions'>".$r_user['code']."&nbsp;&nbsp;&nbsp;(".__("Sponsor ID - ").$sponsor_code.")</td>

 </tr>

 <tr>

  <td>".__("Username").__(":")."</td>

  <td>$r_user[username]</td>

 </tr>

 <tr>

  <td>".__("Name").__(":")."</td>

  <td>$r_user[name]</td>

 </tr>

 <tr>

  <td>".__("Status").__(":")."</td>

  <td>".__($r_status_d[$r_user["status"]])."</td>

 </tr>

 <tr style='display:none'>

  <td>".__("Activated").__(":")."</td>

  <td>".__($r_yesno_d[$r_user["activated"]]).($r_user["activated"]!="y"? "<br />\n<span class='italic'>".replace_tag(__("To activate your account, please click <%link%>here<%/link%>."), array("<%link%>"=>"<a href='".$vars["file"]["member"]["activate"]."'>", "<%/link%>"=>"</a>"))."</span>" : "")."</td>

 </tr>

 <tr>

  <td>".__("Rank").__(":")."</td>

  <td>".($r_user["rank_a"]? __($vars['rank_index_a_d'][$r_user["rank_a"]]) : __("None"))."</td>

 </tr>

 <tr>

  <td>".__("Return Periods").__(":")."</td>

  <td>".$r_user['dividend_count']."</td>

 </tr>

 <tr>

  <td>".__("Daily Return").__(":")."</td>

  <td>".number_format($r_user['dividend_amount']/2,2)." (".__("e-Voucher").") / ".number_format($r_user['dividend_amount']/2,2)." (".__("e-Chip").")</td>

 </tr>

 <tr>".($r_user['is_stockist'] == 'y'? "

 <tr>

  <td>".__("Stockist").__(":")."</td>

  <td>".__("You are a stockist")."</td>

 </tr>" : "")."

 <tr>

  <td>".__("Last Login").__(":")."</td>

  <td>".($r_user["last_login2"]=="0000-00-00 00:00:00"? __("Never") : date($vars["date_format"], strtotime($r_user["last_login2"])))."</td>

 </tr>
                        </table>
			        </div>
                </div>
";



//javascript

ob_start();

?>

<script type='text/javascript' src='<?php echo JS_URL."/get_file_gzip.php?file=".urlencode("jquery.js"); ?>'></script>
<script type='text/javascript' src='/js/smoothness/jquery-1.6.2.min.js'></script>
<script type='text/javascript' src='/js/smoothness/jquery-ui-1.8.11.custom.min.js'></script>
<link rel='stylesheet' href='/js/smoothness/jquery-ui-1.8.18.custom.css' type='text/css'/>

<script type='text/javascript'>

jQuery(document).ready(function(j){
    j("#dgAnnouncementPanel").dialog("destroy");
    j("#dgAnnouncementPanel").dialog({
        bgiframe : true,
        modal : true,
        autoOpen : true,
        minWidth : 750,
        hide: 'clip'
    });

	j('a[@name^=sinfo_]').click(function(){

		var ename = j(this).attr('name');

		var etype = j(this).text();

		if(etype == '+'){

			j(this).html('-');

			j('div#'+ename).slideDown();

		}else{

			j(this).html('+');

			j('div#'+ename).slideUp();

		}

		return false;

	});
});
</script>


<?php if($pop_msg<>''){ ?>
<div id="dgAnnouncementPanel" style="display:none; width: 850px" title="Announcement">
<span style="font-family:Microsoft YaHei; font-size: 14px;">
<?php echo $pop_msg; ?>
</span>
</div>
<?php } ?>
<?php

$jvscript = ob_get_clean();



$this_year = ndate('Y');

$this_month = ndate('n');

$this_month_starttime = mktime(0,0,0,ndate('n'),1,ndate('Y'));

$this_month_endtime = mktime(23,59,59,ndate('n')+1,0,ndate('Y'));

$this_month_start = date("Y-m-d H:i:s", $this_month_starttime);

$this_month_end = date("Y-m-d H:i:s", $this_month_endtime);

$last_month_time = mktime(0,0,0,$this_month-1,1,$this_year);

$last_year = date('Y', $last_month_time);

$last_month = date('n', $last_month_time);

$next_month_time = mktime(0,0,0,$this_month+1,1,$this_year);

$next_year = date('Y', $next_month_time);

$next_month = date('n', $next_month_time);

$last_month_starttime = mktime(0,0,0,$this_month-1,1,ndate('Y'));

$last_month_endtime = mktime(23,59,59,$this_month,0,ndate('Y'));

$last_month_start = date("Y-m-d H:i:s", $last_month_starttime);

$last_month_end = date("Y-m-d H:i:s", $last_month_endtime);

$this_month_maintain = @mysql_result(mysql_query("select sum(amount) from $db->member_maintain where uid='$uid' and year='$this_year' and month='$this_month'"), 0);

$last_month_maintain = @mysql_result(mysql_query("select sum(amount) from $db->member_maintain where uid='$uid' and year='$last_year' and month='$last_month'"), 0);

$next_month_maintain = @mysql_result(mysql_query("select sum(amount) from $db->member_maintain where uid='$uid' and year='$next_year' and month='$next_month'"), 0);

$this_month_maintain_sales = calc_personal_sales($uid, $this_month_start, $this_month_end);

$last_month_maintain_sales = calc_personal_sales($uid, $last_month_start, $last_month_end);
$ymd = ndate('Ymd');
$ym = ndate('Ym');
$today_amount = @mysql_result(mysql_query("select sum(a.total_bv) from $db->purchase a inner join $db->users b on b.id=a.uid and b.ref='$uid' where a.status='confirmed' and date_format(a.cdate,'%Y%m%d')='".$ymd."'"), 0);
$total_amount = @mysql_result(mysql_query("select sum(a.total_bv) from $db->purchase a inner join $db->users b on b.id=a.uid and b.ref='$uid' where a.status='confirmed'"), 0);
$today_dist = @mysql_result(mysql_query("select count(*) from $db->users where ref='$uid' and date_format(cdate,'%Y%m%d')='".$ymd."'"), 0);
$total_dist = @mysql_result(mysql_query("select count(*) from $db->users where ref='$uid'"), 0);
$flash_date = @mysql_result(mysql_query("select flash_date from $db->users where ref='$uid'"), 0);
$today_sponsor = @mysql_result(mysql_query("select s from $db->member_comm_sum where uid='$uid' and date_format(cdate,'%Y%m%d')='".$ymd."'"), 0);
$today_pairing = @mysql_result(mysql_query("select p from $db->member_comm_sum where uid='$uid' and date_format(cdate,'%Y%m%d')='".$ymd."'"), 0);
$today_leadership = @mysql_result(mysql_query("select l from $db->member_comm_sum where uid='$uid' and date_format(cdate,'%Y%m%d')='".$ymd."'"), 0);
$today_bonus = @mysql_result(mysql_query("select s+p+l from $db->member_comm_sum where uid='$uid' and date_format(cdate,'%Y%m%d')='".$ymd."'"), 0);
$month_bonus = @mysql_result(mysql_query("select sum(s+p+l) from $db->member_comm_sum where uid='$uid' and date_format(cdate,'%Y%m')='".$ym."'"), 0);
$total_bonus = @mysql_result(mysql_query("select sum(s+p+l) from $db->member_comm_sum where uid='$uid' group by uid"), 0);
$left_group = @mysql_result(mysql_query("select lcf from $db->member_comm_sum where uid='$uid' and date_format(cdate,'%Y%m%d')='".$ymd."'"), 0);
$right_group = @mysql_result(mysql_query("select rcf from $db->member_comm_sum where uid='$uid' and date_format(cdate,'%Y%m%d')='".$ymd."'"), 0);

if($uid==229){
	$total_amount += 24000;
	$right_group += 8000;
}

"<h2>".__("Your Account Points")."</h2>

<table class='pbt_table'>

	<tr>

		<td width='$td_width'>".replace_tag(__("<%title%> Account Balance"), array("<%title%>"=>__($vars["ewallet_title"]))).__(":")."</td>

		<td>".number_format($r_user["ewallet"], 2)."</td>

	</tr>

	<tr>

		<td width='$td_width'>".replace_tag(__("<%title%> Account Balance"), array("<%title%>"=>__($vars["eswallet_title"]))).__(":")."</td>

		<td>".number_format($r_user["eswallet"], 2)."</td>

	</tr>

	<tr>

		<td width='$td_width'>".replace_tag(__("<%title%> Account Balance"), array("<%title%>"=>__($vars["swallet_title"]))).__(":")."</td>

		<td>".number_format($r_user["swallet"], 2)."</td>

	</tr>

	<tr>

		<td width='$td_width'>".replace_tag(__("<%title%> Account Balance"), array("<%title%>"=>__($vars["mwallet_title"]))).__(":")."</td>

		<td>".number_format($r_user["mwallet"], 2)."</td>

	</tr>

	</table>";

$point=
"
		        <div class='widget'>
			        <div class='widget-header'>
			            <h3><span id='lblSalesInformation'>".__("Your Account Points")."</span></h3>
			        </div>
			        <div class='widget-content'>
			            <table class='table table-striped table-highlight'>
<tr>

		<td width='$td_width'>".replace_tag(__("<%title%> Account Balance"), array("<%title%>"=>__($vars["ewallet_title"]))).__(":")."</td>

		<td>".number_format($r_user["ewallet"], 2)."</td>

	</tr>

	<tr>

		<td width='$td_width'>".replace_tag(__("<%title%> Account Balance"), array("<%title%>"=>__($vars["eswallet_title"]))).__(":")."</td>

		<td>".number_format($r_user["eswallet"], 2)."</td>

	</tr>

	<tr>

		<td width='$td_width'>".replace_tag(__("<%title%> Account Balance"), array("<%title%>"=>__($vars["mwallet_title"]))).__(":")."</td>

		<td>".number_format($r_user["mwallet"], 2)."</td>

	</tr>

	<tr>

		<td width='$td_width'>".replace_tag(__("<%title%> Account Balance"), array("<%title%>"=>__($vars["cwallet_title"]))).__(":")."</td>

		<td>".number_format($r_user["cwallet"], 2)."</td>

	</tr>

	<tr>

		<td width='$td_width'>".replace_tag(__("<%title%> Account Balance"), array("<%title%>"=>__($vars["swallet_title"]))).__(":")."</td>

		<td>".number_format($r_user["swallet"], 2)."</td>

	</tr>
                        </table>
			        </div>
                </div>
";

$ttl_record=@mysql_num_rows($r=mysql_query("SELECT * FROM gg_news WHERE f_status='active' ORDER BY f_date DESC"));

$annoucement=
"
		        <div class='widget'>
			        <div class='widget-header'>
			            <h3><span id='lblSalesInformation'>".__("Announcement")."</span></h3>
			        </div>
			        <div class='widget-content'>
			            <table class='table table-striped table-highlight'>";

for($i=0; $i<$ttl_record; $i++){
	$news=mysql_fetch_assoc($r);

$annoucement.=
"
	<tr>

		<td width='80px'>".$news['f_date']."</td>

		<td>".$news['f_content']."</td>

	</tr>";
}

$annoucement.="
                        </table>
			        </div>
                </div>
";

$link = '<button onclick="location.href=\'group_sales_history.php\'">'.__('View').'</button>';

if($r_user['is_distributor']=='y'){

$earning =

'<div class="widget">
			        <div class="widget-header">
				        <h3>
					        <span id="lblEARNINGS">'.__('Profit Earnings').'</span>
				        </h3>
			        </div>
			        <div class="widget-content">
						<table class="table table-striped table-highlight">
							<tr>
						    	<td><strong><span id="lblTodaySponsorBonus_lbl">'.__('Today Sponsor Bonus').'</span></strong></td>
						        <td class="actions"><span id="lblTodaySponsorBonus"><b>'.$vars["currency"].number_format($today_sponsor,2).'</b></span></td>
						    </tr>
						    <tr>
						        <td><strong><span id="lblTodayPairing_lbl">'.__('Today Pairing Bonus').'</span></strong></td>
						        <td class="actions"><span id="lblTodayPairing"><b>'.$vars["currency"].number_format($today_pairing,2).'</b></span></td>
						    </tr>
						    <tr>
						        <td><strong><span id="lblTodayMatching_lbl">'.__('Today Leadership Bonus').'</span></strong></td>
						        <td class="actions"><span id="lblTodayMatching"><b>'.$vars["currency"].number_format($today_leadership,2).'</b></span></td>
						    </tr>
							<tr>
								<td><strong><span id="lblToday">'.__('Today earnings').'</span></strong></td>
								<td class="actions"><span id="lblTodayBonus"><b>'.$vars["currency"].number_format($today_bonus,2).'</b></span></td>
							</tr>
							<tr>
								<td><strong><span id="lblThisMth">'.__('This month earnings').'</span></strong></td>
								<td class="actions"><span id="lblThisMthBonus"><b>'.$vars["currency"].number_format($month_bonus,2).'</b></span></td>
							</tr>
							<tr>
								<td><strong><span id="lblTotal">'.__('Total earnings').'</span></strong></td>
								<td class="actions"><span id="lblTotalBonus"><b>'.$vars["currency"].number_format($total_bonus,2).'</b></span></td>
							</tr>
						</table>
			        </div>
			        <br>
			        <div class="widget-header">
				        <h3>
					        <span id="lblEARNINGS">'.__('Sales Information').'</span>
				        </h3>
			        </div>
			        <div class="widget-content">
						<table class="table table-striped table-highlight">
						    <tr>
						        <td><strong><span id="lblFlash_lbl">'.__('Flash Date').'</span></strong></td>
						        <td class="actions"><span id="lblFlash"><b>'.$flash_date.'</b></span></td>
						    </tr>
							<tr>
						    	<td><strong><span id="lblLeftSales_lbl">'.__('Left Group Sales').'</span></strong></td>
						        <td class="actions"><span id="lblLeftSales"><b>'.number_format($left_group,0).'</b></span>&nbsp;&nbsp;&nbsp;'.$link.'</td>
						    </tr>
						    <tr>
						        <td><strong><span id="lblRightSales_lbl">'.__('Right Group Sales').'</span></strong></td>
						        <td class="actions"><span id="lblRightSales"><b>'.number_format($right_group,0).'</b></span>&nbsp;&nbsp;&nbsp;'.$link.'</td>
						    </tr>
						    <tr>
						        <td><strong><span id="lblTodaySales_lbl">'.__('Today Sales').'</span></strong></td>
						        <td class="actions"><span id="lblTodaySales"><b>'.$vars["currency"].number_format($today_amount,2).'</b></span></td>
						    </tr>
							<tr>
								<td><strong><span id="lblTotalSales_lbl">'.__('Total Sales').'</span></strong></td>
								<td class="actions"><span id="lblTotalSales"><b>'.$vars["currency"].number_format($total_amount,2).'</b></span></td>
							</tr>
							<tr>
								<td><strong><span id="lblTodayDist_lbl">'.__('Today Distributor').'</span></strong></td>
								<td class="actions"><span id="lblTodayDist"><b>'.number_format($today_dist,0).'</b></span></td>
							</tr>
							<tr>
								<td><strong><span id="lblTotalDist_lbl">'.__('Total Distributor').'</span></strong></td>
								<td class="actions"><span id="lblTotalDist"><b>'.number_format($total_dist,0).'</b></span></td>
							</tr>
						</table>
			        </div>
			        <br>
			        <div class="widget-header">
				        <h3>
					        <span id="lblEARNINGS">'.__('Currency Rate To GBP').'</span>
				        </h3>
			        </div>
			        <div class="widget-content">
						<table class="table table-striped table-highlight">
						    <tr>
						        <td><strong><span id="lblCurrency_lbl">'.__('Currency Code').'</span></strong></td>
						        <td class="actions"><span id="lblCurrency"><b>'.__('In').'</b></span></td>
						        <td class="actions"><span id="lblCurrency"><b>'.__('Out').'</b></span></td>
						    </tr>
						    <tr>
						        <td><strong><span id="lblCurrency_lbl">'.__('GBP').'</span></strong></td>
						        <td class="actions"><span id="lblCurrency"><b>1.10</b></span></td>
						        <td class="actions"><span id="lblCurrency"><b>1.00</b></span></td>
						    </tr>
						    <tr>
						        <td><strong><span id="lblCurrency_lbl">'.__('HKD').'</span></strong></td>
						        <td class="actions"><span id="lblCurrency"><b>13.80</b></span></td>
						        <td class="actions"><span id="lblCurrency"><b>12.50</b></span></td>
						    </tr>
						    <tr>
						        <td><strong><span id="lblCurrency_lbl">'.__('IND').'</span></strong></td>
						        <td class="actions"><span id="lblCurrency"><b>20,000</b></span></td>
						        <td class="actions"><span id="lblCurrency"><b>18,000</b></span></td>
						    </tr>
						    <tr>
						        <td><strong><span id="lblCurrency_lbl">'.__('INR').'</span></strong></td>
						        <td class="actions"><span id="lblCurrency"><b>110</b></span></td>
						        <td class="actions"><span id="lblCurrency"><b>100</b></span></td>
						    </tr>
						    <tr>
						        <td><strong><span id="lblCurrency_lbl">'.__('JPY').'</span></strong></td>
						        <td class="actions"><span id="lblCurrency"><b>190</b></span></td>
						        <td class="actions"><span id="lblCurrency"><b>171</b></span></td>
						    </tr>
						    <tr>
						        <td><strong><span id="lblCurrency_lbl">'.__('MYR').'</span></strong></td>
						        <td class="actions"><span id="lblCurrency"><b>5.8</b></span></td>
						        <td class="actions"><span id="lblCurrency"><b>5.2</b></span></td>
						    </tr>
						    <tr>
						        <td><strong><span id="lblCurrency_lbl">'.__('RMB').'</span></strong></td>
						        <td class="actions"><span id="lblCurrency"><b>11</b></span></td>
						        <td class="actions"><span id="lblCurrency"><b>10</b></span></td>
						    </tr>
						    <tr>
						        <td><strong><span id="lblCurrency_lbl">'.__('SGD').'</span></strong></td>
						        <td class="actions"><span id="lblCurrency"><b>2.2</b></span></td>
						        <td class="actions"><span id="lblCurrency"><b>2</b></span></td>
						    </tr>
						    <tr>
						        <td><strong><span id="lblCurrency_lbl">'.__('THB').'</span></strong></td>
						        <td class="actions"><span id="lblCurrency"><b>55</b></span></td>
						        <td class="actions"><span id="lblCurrency"><b>50</b></span></td>
						    </tr>
						    <tr>
						        <td><strong><span id="lblCurrency_lbl">'.__('TWD').'</span></strong></td>
						        <td class="actions"><span id="lblCurrency"><b>52</b></span></td>
						        <td class="actions"><span id="lblCurrency"><b>47</b></span></td>
						    </tr>
						    <tr>
						        <td><strong><span id="lblCurrency_lbl">'.__('USD').'</span></strong></td>
						        <td class="actions"><span id="lblCurrency"><b>1.80</b></span></td>
						        <td class="actions"><span id="lblCurrency"><b>1.62</b></span></td>
						    </tr>
						</table>
			        </div>
		        </div>
            </div>';

}else{

	$earning =

'<div class="widget">
			        <div class="widget-header">
				        <h3>
					        <span id="lblEARNINGS">'.__('Currency Rate To GBP').'</span>
				        </h3>
			        </div>
			        <div class="widget-content">
						<table class="table table-striped table-highlight">
						    <tr>
						        <td><strong><span id="lblCurrency_lbl">'.__('Currency Code').'</span></strong></td>
						        <td class="actions"><span id="lblCurrency"><b>'.__('In').'</b></span></td>
						        <td class="actions"><span id="lblCurrency"><b>'.__('Out').'</b></span></td>
						    </tr>
						    <tr>
						        <td><strong><span id="lblCurrency_lbl">'.__('GBP').'</span></strong></td>
						        <td class="actions"><span id="lblCurrency"><b>1.10</b></span></td>
						        <td class="actions"><span id="lblCurrency"><b>1.00</b></span></td>
						    </tr>
						    <tr>
						        <td><strong><span id="lblCurrency_lbl">'.__('HKD').'</span></strong></td>
						        <td class="actions"><span id="lblCurrency"><b>13.80</b></span></td>
						        <td class="actions"><span id="lblCurrency"><b>12.50</b></span></td>
						    </tr>
						    <tr>
						        <td><strong><span id="lblCurrency_lbl">'.__('IND').'</span></strong></td>
						        <td class="actions"><span id="lblCurrency"><b>20,000</b></span></td>
						        <td class="actions"><span id="lblCurrency"><b>18,000</b></span></td>
						    </tr>
						    <tr>
						        <td><strong><span id="lblCurrency_lbl">'.__('INR').'</span></strong></td>
						        <td class="actions"><span id="lblCurrency"><b>110</b></span></td>
						        <td class="actions"><span id="lblCurrency"><b>100</b></span></td>
						    </tr>
						    <tr>
						        <td><strong><span id="lblCurrency_lbl">'.__('JPY').'</span></strong></td>
						        <td class="actions"><span id="lblCurrency"><b>190</b></span></td>
						        <td class="actions"><span id="lblCurrency"><b>171</b></span></td>
						    </tr>
						    <tr>
						        <td><strong><span id="lblCurrency_lbl">'.__('MYR').'</span></strong></td>
						        <td class="actions"><span id="lblCurrency"><b>5.8</b></span></td>
						        <td class="actions"><span id="lblCurrency"><b>5.2</b></span></td>
						    </tr>
						    <tr>
						        <td><strong><span id="lblCurrency_lbl">'.__('RMB').'</span></strong></td>
						        <td class="actions"><span id="lblCurrency"><b>11</b></span></td>
						        <td class="actions"><span id="lblCurrency"><b>10</b></span></td>
						    </tr>
						    <tr>
						        <td><strong><span id="lblCurrency_lbl">'.__('SGD').'</span></strong></td>
						        <td class="actions"><span id="lblCurrency"><b>2.2</b></span></td>
						        <td class="actions"><span id="lblCurrency"><b>2</b></span></td>
						    </tr>
						    <tr>
						        <td><strong><span id="lblCurrency_lbl">'.__('THB').'</span></strong></td>
						        <td class="actions"><span id="lblCurrency"><b>55</b></span></td>
						        <td class="actions"><span id="lblCurrency"><b>50</b></span></td>
						    </tr>
						    <tr>
						        <td><strong><span id="lblCurrency_lbl">'.__('TWD').'</span></strong></td>
						        <td class="actions"><span id="lblCurrency"><b>52</b></span></td>
						        <td class="actions"><span id="lblCurrency"><b>47</b></span></td>
						    </tr>
						    <tr>
						        <td><strong><span id="lblCurrency_lbl">'.__('USD').'</span></strong></td>
						        <td class="actions"><span id="lblCurrency"><b>1.80</b></span></td>
						        <td class="actions"><span id="lblCurrency"><b>1.62</b></span></td>
						    </tr>
						</table>
			        </div>
		        </div>
            </div>';

}

//display phase 1 sales
$total_sales = @mysql_result(mysql_query("select sum(total_bv) from gg_purchase where status='confirmed'"), 0);
//$balance_sales = 7000000 - $total_sales;
$balance_sales = 46000000 - $total_sales;
if($balance_sales>0){
/*$counter = "<table width='100%'><tr class='row1'>
		<td class='number' width='160'>
			<div id='glyphs'><p><font color='black'>First Phase Balance: ".number_format($balance_sales,0)."</font></p></div>
		</td></tr></table>";
*/
$counter = "

<style>
    <!--
    .menu2 {
        font-family: arial, sans-serif;
        font-size: 15;
        font-weight: bold;
        color: black;
        height: 22px;
        float: left;
        padding: 5px 25px 0px 25px;
    }

    .menu2:hover {
        background: #B09230;
        color: white;
    }

    -->
</style>
<table width='100%' border='0' cellpadding='0' bgcolor='#CCCCCC'>
    <tbody>
    <tr>
        <td align='left'>

        </td>
    </tr>
    </tbody>
</table>

<p>&nbsp;</p>


<title>IRONMENFX - 主页</title>
<link href='/images/ironmenfx/mi.css' rel='stylesheet' type='text/css'>


<div style='width:100%; min-width:480px; height:auto; min-height:600px; padding:0px 0px 10px 10px;'>
    <table border='0' align='center' width='100%'>
        <tbody>
        <tr>
            <td>


                <table width='95%' cellpadding='10' cellspacing='0' style='border-style:solid; border-width:1px;'>
                    <tbody>
                    <tr>
                        <td width='67%' class='text1'>

                            <table width='260'>

                                <tbody>
                                <tr>
                                    <td class='text1' nowrap=''><strong>".__('Transfer Point TP')."</strong></td>
                                    <td class='text1' width='10' align='right'><strong>:</strong></td>
                                    <td class='text1' width='100' align='right'>".number_format($r_user['mwallet'], 2)."</td>
                                </tr>

                                <tr>
                                    <td class='text1' nowrap=''><strong>".__('Signup Point SP')."</strong></td>
                                    <td class='text1' width='10' align='right'><strong>:</strong></td>
                                    <td class='text1' width='100' align='right'>".number_format($r_user['eswallet'], 2)."</td>
                                </tr>

                                <tr>
                                    <td class='text1' nowrap=''><strong>".__('Bonus Point BP')."</strong></td>
                                    <td class='text1' width='10' align='right'><strong>:</strong></td>
                                    <td class='text1' width='100' align='right'>".number_format($r_user['ewallet'], 2)."</td>
                                </tr>

                                <tr>
                                    <td class='text1' nowrap=''><strong>".__('Activity Point AP')."</strong></td>
                                    <td class='text1' width='10' align='right'><strong>:</strong></td>
                                    <td class='text1' width='100' align='right'>".number_format($r_user['twallet'], 2)."</td>
                                </tr>

                                <tr>
                                    <td class='text1' nowrap=''><strong>".__('Reserved Point RP')."</strong></td>
                                    <td class='text1' width='10' align='right'><strong>:</strong></td>
                                    <td class='text1' width='100' align='right'>".number_format($r_user['cwallet'], 2)."</td>
                                </tr>

                                </tbody>
                            </table>
                        </td>
                    </tr>
                    </tbody>
                </table>

                <br>


                <title>套利结果</title>
                <style type='text/css'>
                    <!--
                    .style3 {
                        font-size: 36px;
                        color: #000000;
                    }

                    -->
                </style>
                <link href='/images/ironmenfx/mystyle.css' rel='stylesheet' type='text/css'>
";

if($_SESSION['lan']=='en'){
$arbitrage_result = @mysql_result(mysql_query("select value from $db->settings where param='en_result'"), 0);
}else{
$arbitrage_result = @mysql_result(mysql_query("select value from $db->settings where param='cn_result'"), 0);
}
$counter .= $arbitrage_result;
/*
$counter .= "

                <br>


                <p class='fonttitle'>".__('Investment Portfolio')."</p>

                <table border='1' cellspacing='2' cellpadding='2' id='customers' width='100%'>
                    <tbody>
                    <tr>

                        <th nowrap=''><a class='fontwhite' href='javascript:list(0,20,'namerank')'>".__('Package')."</a>
                        </th>
                        <th nowrap=''><a class='fontwhite' href='javascript:list(0,20,'r_period')'>".__('Period')."</a>
                        </th>

                        <th nowrap=''><a class='fontwhite' href='javascript:list(0,20,'r_bonusamount')'>".__('ROI Amount')."</a>
                        </th>
                        <th nowrap=''><a class='fontwhite' href='javascript:list(0,20,'r_bonusdate')'>".__('ROI Date')."</a>
                        </th>
                        <th nowrap=''><a class='fontwhite' href='javascript:list(0,20,'r_payout')'>".__('Total Return')."</a>
                        </th>
                    </tr>
";

$ttl_record = @mysql_num_rows($r=mysql_query("SELECT * FROM gg_incentive WHERE uid='".$r_user['id']."' and counter>=0"));


for($i=0; $i<$ttl_record; $i++){
	$packages=mysql_fetch_assoc($r);

	$counter .= "<tr>
					<td nowrap=''>".__($packages['package'])."</td>
                    <td nowrap='' align='right'>".$packages['counter']."</td>
					<td nowrap='' align='right'>".$packages['amount']."</td>
                    <td nowrap=''>".date('Y-m-d')."</td>
					<td nowrap='' align='right'>".$packages['payout']."</td>
                 </tr>";
}

$counter .= "
                    </tbody>
                </table>


            </td>
        </tr>
        </tbody>
    </table>
</div>


<p>&nbsp;</p>";
*/

$counter .= "</td>
        </tr>
        </tbody>
    </table></div>";
}else{
$counter = '';
}
$content=$new_server_news.'<div class="row"><div class="span8">
'.$counter.'</div></div>';
//'.$counter.$acc.$point.$annoucement.'</div><div class="span4">'.$earning.'</div></div>';



print format_member_page($content, $this_title, $content_title, $jvscript);

?>
